package com.smartpro.mis.modular.system.dao;

import com.smartpro.mis.modular.business.neo4jEntity.ApplyRefundRelationship;
import com.smartpro.mis.modular.business.neo4jEntity.N4jUser;
import com.smartpro.mis.modular.business.neo4jEntity.RefundFinishRelationship;
import org.springframework.data.neo4j.annotation.Query;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;

import java.util.Collection;

/**
 * @author Michael Hunger
 * @author Mark Angrish
 * @author Michael J. Simons
 */
@RepositoryRestResource(collectionResourceRel = "refundFinishRelationship", path = "refundFinishRelationship")
public interface RefundFinishRelationRepository extends Neo4jRepository<RefundFinishRelationship, Long> {

	RefundFinishRelationship findByN4jUser(@Param("n4jUser") N4jUser n4jUser);


    @Query("MATCH (m:RefundFinishRelationship) RETURN m.n4jUser LIMIT {limit}")
	Collection<N4jUser> graph(@Param("limit") int limit);
}